#include "World.h"

#include "Room.h"
#include "Rooms\GloomyForest.h"
#include "Rooms\DarkPath.h"
#include "Exit.h"

WorldPtr World::singleton;

WorldPtr World::getSingleton()
{
	if(World::singleton == nullptr)
		World::singleton = std::make_shared<World>();
	return World::singleton;
}

World::World()
	: GameObject("World", "The World of this Game")
{
}

World::~World()
{
}

void World::init(const RoomPtr &start_room)
{
	if(start_room)
	{
		this->start_room = start_room;
	}
	else
	{

	}
	/*//Set up rooms
	auto room00 = std::make_shared<GloomyForest>();
	auto room01 = std::make_shared<DarkPath>();

	//Set up exits
	room00->add(std::make_shared<Exit>(Exit::EAST, room01, "It's difficult to see through the thick brush."));
	room01->add(std::make_shared<Exit>(Exit::WEST, room00, "It's difficult to see through the thick brush."));

	start_room = room00;
	rooms.push_back(room00);
	rooms.push_back(room01);*/
}
